package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallUserAddress;
import com.appkubes.mall.core.po.MallUserAddressExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallUserAddressMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAddressSqlProvider.class, method="countByExample")
    long countByExample(MallUserAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallUserAddressSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallUserAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_user_address",
        "where user_address_key = #{userAddressKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String userAddressKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_user_address (user_address_key, app_key, ",
        "user_key, `name`, mobile, ",
        "province, city, ",
        "district, address, ",
        "is_default, create_time, ",
        "update_time, lat, ",
        "lng, version, tag)",
        "values (#{userAddressKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, ",
        "#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, ",
        "#{district,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ",
        "#{isDefault,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=INTEGER}, #{lat,jdbcType=DECIMAL}, ",
        "#{lng,jdbcType=DECIMAL}, #{version,jdbcType=INTEGER}, #{tag,jdbcType=LONGVARCHAR})"
    })
    int insert(MallUserAddress record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallUserAddressSqlProvider.class, method="insertSelective")
    int insertSelective(MallUserAddress record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAddressSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="user_address_key", property="userAddressKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="district", property="district", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="lat", property="lat", jdbcType=JdbcType.DECIMAL),
        @Result(column="lng", property="lng", jdbcType=JdbcType.DECIMAL),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="tag", property="tag", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallUserAddress> selectByExampleWithBLOBsWithRowbounds(MallUserAddressExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAddressSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="user_address_key", property="userAddressKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="district", property="district", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="lat", property="lat", jdbcType=JdbcType.DECIMAL),
        @Result(column="lng", property="lng", jdbcType=JdbcType.DECIMAL),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="tag", property="tag", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallUserAddress> selectByExampleWithBLOBs(MallUserAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAddressSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_address_key", property="userAddressKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="district", property="district", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="lat", property="lat", jdbcType=JdbcType.DECIMAL),
        @Result(column="lng", property="lng", jdbcType=JdbcType.DECIMAL),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserAddress> selectByExampleWithRowbounds(MallUserAddressExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserAddressSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_address_key", property="userAddressKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="district", property="district", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="lat", property="lat", jdbcType=JdbcType.DECIMAL),
        @Result(column="lng", property="lng", jdbcType=JdbcType.DECIMAL),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserAddress> selectByExample(MallUserAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "user_address_key, app_key, user_key, `name`, mobile, province, city, district, ",
        "address, is_default, create_time, update_time, lat, lng, version, tag",
        "from mall_user_address",
        "where user_address_key = #{userAddressKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="user_address_key", property="userAddressKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="district", property="district", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="lat", property="lat", jdbcType=JdbcType.DECIMAL),
        @Result(column="lng", property="lng", jdbcType=JdbcType.DECIMAL),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="tag", property="tag", jdbcType=JdbcType.LONGVARCHAR)
    })
    MallUserAddress selectByPrimaryKey(String userAddressKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserAddressSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallUserAddress record, @Param("example") MallUserAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserAddressSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") MallUserAddress record, @Param("example") MallUserAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserAddressSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallUserAddress record, @Param("example") MallUserAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserAddressSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallUserAddress record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_address",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "mobile = #{mobile,jdbcType=VARCHAR},",
          "province = #{province,jdbcType=VARCHAR},",
          "city = #{city,jdbcType=VARCHAR},",
          "district = #{district,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "is_default = #{isDefault,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "lat = #{lat,jdbcType=DECIMAL},",
          "lng = #{lng,jdbcType=DECIMAL},",
          "version = #{version,jdbcType=INTEGER},",
          "tag = #{tag,jdbcType=LONGVARCHAR}",
        "where user_address_key = #{userAddressKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(MallUserAddress record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_address
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_address",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "mobile = #{mobile,jdbcType=VARCHAR},",
          "province = #{province,jdbcType=VARCHAR},",
          "city = #{city,jdbcType=VARCHAR},",
          "district = #{district,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "is_default = #{isDefault,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "lat = #{lat,jdbcType=DECIMAL},",
          "lng = #{lng,jdbcType=DECIMAL},",
          "version = #{version,jdbcType=INTEGER}",
        "where user_address_key = #{userAddressKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallUserAddress record);
}